

import { intl } from '@/utils';
import Notify from 'devextreme/ui/notify';
//intl('ac.selectSomeFile', '请选择一些文件再试!')
//信息单元 
/*   <Toast visible={toastVisible} message={intl('ac.selectSomeFile', '请选择一些文件再试!')} type="error" position="center" width="500px" /> */
export function msgInfo(msg: any, displayTime?: number, position?: string, width?: string) {
    Notify({ message: msg, position: position || "center", width: width || "500px", closeOnClick: true }, 'info', displayTime || 3000);
}
export function msgError(msg: any, displayTime?: number, position?: string, width?: string) {
    Notify({ message: msg, position: position || "center", width: width || "500px", closeOnClick: true }, 'error', displayTime || 5000);
}
export function msgWaring(msg: any, displayTime?: number, position?: string, width?: string) {
    Notify({ message: msg, position: position || "center", width: width || "500px", closeOnClick: true }, 'warning', displayTime || 5000);
}
export function msgSuccess(msg: any, displayTime?: number, position?: string, width?: string) {
    Notify({ message: msg, position: position || "center", width: width || "500px", closeOnClick: true }, 'success', displayTime || 3000);
}
//不支持
export function msgErrorOfbrowseIsNotPlatform(displayTime?: number) {
    msgError(intl('ac.browseIsNotPlatform', '您的浏览器不是支持此功能,请下载函证工具再进行操作!'), displayTime || 10000);//10s
}
//不支持提示
export function msgErrorOfbrowseIsNotPlatform1s() {
    msgErrorOfbrowseIsNotPlatform(1000);
}
//不支持提示
export function msgErrorOfbrowseIsNotPlatform2s() {
    msgErrorOfbrowseIsNotPlatform(2000);
}
//不支持提示
export function msgErrorOfbrowseIsNotPlatform3s() {
    msgErrorOfbrowseIsNotPlatform(3000);
}
